<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html
	class=" js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg no-smil svgclippaths">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>XToolsCRM - easy to Power</title>


<link href="../css/zcss/icons.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/pages.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/responsive.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/sweetalert.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/custombox.min.css" rel="stylesheet">
<link href="../css/zcss/animate.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/css.css" rel="stylesheet" type="text/css">

<link href="../css/zcss/bootstrap-datepicker3.min.css" rel="stylesheet">
<link href="../css/zcss/switchery.min.css" rel="stylesheet">
<link href="../css/zcss/bootstrap-clockpicker.min.css" rel="stylesheet">
<link href="../css/zcss/bootstrap-table.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/bootstrap.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/bootstrap-select.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/core.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/components.css" rel="stylesheet" type="text/css">

<!--图标的外部样式-->
<link href="http://cdn.xtcrm.com/cdn//v7/fm/ub/css/icons.css"
	rel="stylesheet" type="text/css">
<!--图标的外部样式-->

<link href="../css/zcss/pages.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/responsive.css" rel="stylesheet" type="text/css">
<link href="../css/zcss/sweetalert.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/custombox.min.css" rel="stylesheet">
<link href="../css/zcss/animate.min.css" rel="stylesheet"
	type="text/css">
<link href="../css/zcss/css.css" rel="stylesheet" type="text/css">



<script src="http://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<!-- 引入样式 -->
<link rel="stylesheet"
	href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>

<style type="text/css">
.col6 {
	width: 370px;
	float: left
}

.col4 {
	float: left
}

.col8 {
	float: left;
	width: 240px;
}
</style>

</head>

<body class="fixed-left modal-open" onload=";">

	<div class="createOrderbox"
		style="width: 800px; height: 100%; margin: 0 auto;"
		id="createOrderbox">
		<el-form :model="ruleForm" :rules="rules" ref="ruleForm"
			class="demo-ruleForm">

		<div id="popshowcont">
			<div id="gedit">

				<div class="portlet form-horizontal border-n">
					<div class="portlet-heading portlet-default">
						<div class="pull-right f-s-12" v-if="ruleForm.intype==3022">

							<!--菜单选择处-->

							<el-button @click="doupiframe(ruleForm.did)"
								style="width:76px;height:36px;text-align:center;padding:0">
							<i class="fa fa-trash-o m-r-5"></i>删除</el-button>
							&nbsp;
							<el-button @click="dodetail(ruleForm.did)"
								style="width:161px;height:36px;text-align:center;padding:0">
							<i class="ti-marker-alt m-r-5"></i>编辑明细，确认入库</el-button>
							&nbsp;

							<el-button @click="doupiframe(ruleForm.did)"
								style="width:76px;height:36px;text-align:center;padding:0">
							<i class="fa fa-pencil m-r-5"></i>编辑</el-button>
							&nbsp;
							<!--菜单选择处-->

						</div>
						<h4 class="modal-title text-dark">
							<span set-lan="html:入库单">入库单</span> <a title=""
								href="/system/viewlog.xt?dtname=libin&amp;id=52&amp;mdb=fe72bbcc2ec1baccbb334706f08f4c76"
								target="_blank" data-original-title="数据日志" data-toggle="tooltip"
								data-placement="bottom"><i class="fa fa-bars m-r-5"></i></a>
						</h4>
						<hr class="border-t-a">

					</div>
					<div class="gedit_scroll_content">
						<div class="panel-collapse collapse in" id="bg-default">
							<div class="portlet-body p-t-0 p-r-7 show-box">
								<div class="row">
									<div class="col-md-12">
										<div class="form-group ">
											<label class="control-label col-md-2"
												style="float: left; margin-left: 10px">主题:</label>
											<div class="form-control  col-md-10"
												style="float: left; width: 240px;">{{ruleForm.titles}}</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-6 col6">
										<div class="form-group ">
											<label class="control-label col-md-4 " style="float: left">仓库:</label>
											<div class="form-control  col-md-8"
												style="float: left; width: 240px;">{{ruleForm.deport}}</div>
										</div>
									</div>
									<div class="col-md-6 col6">
										<div class="form-group ">
											<label class="control-label col-md-4 col4">填单时间:</label>
											<div class="form-control  col-md-8 col8">{{ruleForm.havetime}}</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-6 col6">
										<div class="form-group ">
											<label class="control-label col-md-4 col4">状态:</label>
											<div class="form-control  col-md-8 col8">{{ruleForm.types}}</div>
										</div>
									</div>
									<div class="col-md-6 col6">
										<div class="form-group ">
											<label class="control-label col-md-4 col4">填单人:</label>
											<div class="form-control  col-md-8 col8">{{ruleForm.domans}}</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-6 col6">
										<div class="form-group ">
											<label class="control-label col-md-4 col4">库管确认:</label>
											<div class="form-control  col-md-8 col8">{{ruleForm.yesman}}</div>
										</div>
									</div>
									<div class="col-md-6 col6">
										<div class="form-group ">
											<label class="control-label col-md-4 col4">执行时间:</label>
											<div class="form-control  col-md-8 col8">{{ruleForm.dodate}}</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-6 col6">
										<div class="form-group ">
											<label class="control-label col-md-4 col4">对应采购单:</label>
											<div class="form-control  col-md-8 col8" v-if="ruleForm.orders!=null">
												<span style="font-weight: normal; color: #9e9e9e">〖</span>{{ruleForm.orders}}
												<a
													href="javascript:vopen('/lib/purchase/detail.xt?id=40','purchase40',999,600);"><i
													class="fa fa-folder-open m-l-5"
													data-original-title="打开详细页面" data-toggle="tooltip"
													data-placement="bottom"></i></a><span
													style="font-weight: normal; color: #9e9e9e">〗</span>
											</div>
										</div>
									</div>
									<div class="col-md-6 col6">
										<div class="form-group ">
											<label class="control-label col-md-4 col4">对应退货单:</label>
											<div class="form-control  col-md-8 col8">{{ruleForm.retorder}}</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-12 col6">
										<div class="form-group ">
											<label class="control-label col-md-2 col4"
												style="margin-left: 10px">对应供应商:</label>
											<div class="form-control  col-md-10 col8" v-if="ruleForm.suppliers!=null">
												<span style="font-weight: normal; color: #9e9e9e">〖</span>{{ruleForm.suppliers}}
												<a
													href="javascript:vopen('/xcrm/customer/customer/detail.xt?id=136','customer136',999,600);"><i
													class="fa fa-folder-open m-l-5"
													data-original-title="打开详细页面" data-toggle="tooltip"
													data-placement="bottom"></i></a><span
													style="font-weight: normal; color: #9e9e9e">〗</span>
											</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-12 col6">
										<div class="form-group no-margin">
											<label class="control-label col-md-2 col4"
												style="margin-left: 10px">备注:</label>
											<div class="form-control autogrow col-md-10 col8">{{ruleForm.descins}}</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-12">
										<div class="form-group no-margin">
											<label class="control-label col-md-2">入库明细:</label>
											<div class="form-control autogrow col-md-10">
												<div class="bootstrap-table">
													<div class="fixed-table-container">
														<table class="table table-bordered table-hover"
															id="location_product">
															<thead>
																<tr>
																	<th class="th-inner" style="white-space: nowrap"><span
																		style="font-family: 楷体;">序号</span></th>
																	<th class="th-inner" nowrap="" style="text-align: left"><span
																		style="font-family: 楷体">品名</span></th>
																	<th class="th-inner" nowrap="" style="text-align: left"><span
																		style="font-family: 楷体">型号</span></th>
																	<th class="th-inner" nowrap="" style="text-align: left"><span
																		style="font-family: 楷体">规格</span></th>
																	<th class="th-inner" nowrap=""
																		style="text-align: right"><span
																		style="font-family: 楷体">单位</span></th>
																	<th class="th-inner" nowrap=""
																		style="text-align: right"><span
																		style="font-family: 楷体">入库量</span></th>
																	<th class="th-inner" nowrap="" style="text-align: left"><span
																		style="font-family: 楷体">备注</span></th>
																	<th class="th-inner" style="white-space: nowrap"><span
																		style="font-family: 楷体;">参考库位</span></th>
																</tr>
															</thead>
															<tbody>
																<tr v-for="(colle,i) in thismingx">
																	<td nowrap="">{{i+1}}</td>
																	<td style="text-align: left;">{{colle.goods.gooName}} <a
																		href="javascript:vopen('/xcrm/market/product/detail.xt?id=72','product',999,600);"><i
																			class="fa fa-folder-open m-l-5"
																			data-original-title="打开详细页面" data-toggle="tooltip"
																			data-placement="bottom"></i></a>
																	</td>
																	<td style="text-align: left;">-</td>
																	<td style="text-align: left;">-</td>
																	<td style="text-align: right;">-</td>
																	<td style="text-align: right; white-space: nowrap">{{colle.quatity}}</td>
																	<td style="text-align: left;">{{colle.desc}}</td>
																	<td align="" style="display: none;">&nbsp;</td>
																</tr>
																<tr>
																	<td>合计</td>
																	<td></td>
																	<td></td>
																	<td></td>
																	<td></td>
																	<td style="text-align: right; white-space: nowrap;">{{quatitys}}</td>
																	<td></td>
																</tr>
															</tbody>
														</table>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
								<!--UTF8-->


							</div>
						</div>
					</div>
					<div class="text-right p-20" v-if="ruleForm.intype==3022">
							<!--菜单选择处-->

							<el-button @click="doupiframe(ruleForm.did)"
								style="width:76px;height:36px;text-align:center;padding:0">
							<i class="fa fa-trash-o m-r-5"></i>删除</el-button>
							&nbsp;
							<el-button @click="dodetail(ruleForm.did)"
								style="width:161px;height:36px;text-align:center;padding:0">
							<i class="ti-marker-alt m-r-5"></i>编辑明细，确认入库</el-button>
							&nbsp;

							<el-button @click="doupiframe(ruleForm.did)"
								style="width:76px;height:36px;text-align:center;padding:0">
							<i class="fa fa-pencil m-r-5"></i>编辑</el-button>
							&nbsp;
							<!--菜单选择处-->

					</div>
				</div>



				<!--UTF8-->
			</div>
		</div>
		</el-form>
	</div>
	<script type="text/javascript">
			var vm = new Vue({
				el: ".createOrderbox",
				data: {
					thisjson:[],
					quatitys:0,
					loading: true,
					ruleForm: {
						did:"",
						/*主题*/
						titles: "",
						/*仓库*/
						deport: "",
						customertoman: [{
							adid: '选项1',
							adn: '黄金糕'
						}, {
							adid: '选项2',
							adn: '双皮奶'
						}, {
							adid: '选项3',
							adn: '蚵仔煎'
						}, {
							adid: '选项4',
							adn: '龙须面'
						}, {
							adid: '选项5',
							adn: '北京烤鸭'
						}],
						/*填单日期*/
						havetime: "",
						/*状态*/
						types: "",
						/*填单人*/
						domans: "",
						/*库管确认*/
						yesman: "",
						intype:"",
						/*执行时间*/
						dodate: "",
						/*对应采购单*/
						orders: "",
						/*对应退货单*/
						retorder: "",
						/*对应供应商*/
						suppliers: "",
						/*备注*/
						descin: "",
						/*入库明细*/
						indetails: ""
					},
					rules: {
						//数据源model
						titles: [
							//非空验证
							{
								required: true,
								message: '请输入获客主题',
								trigger: 'blur'
							},
							//长度验证
							{
								min: 3,
								max: 5,
								message: '长度在 3 到 5 个字符',
								trigger: 'blur'
							}
						],
						deport: [{
							required: true,
							message: '请选择仓库',
							trigger: 'change'
						}],
						havetime: [
							//数据类型要是date
							{
								type: 'date',
								required: true,
								message: '请选择日期',
								trigger: 'change'
							}
						]
					}

				},
				methods: {
					dodetail(ids){
						//编辑明细信息
						//alert(ids);
						window.parent.location.href="/instockesdetail?ids="+ids;
					},
					doupiframe(ids) {
						//編輯詳略信息
						//alert("sss"+ids);
					 const loading = this.$loading({
          				 lock: true,
        				 text: 'Loading',
          				 spinner: 'el-icon-loading',
        				 background: 'rgba(0, 0, 0, 0.7)'
        			 });
       					 setTimeout(() => {
          				 loading.close();
        			    }, 2000);
					 window.location.href="/instockesdilogup?ids="+ids;
					}
				},mounted() {
					var sheslfse=${shelfs};
					this.ruleForm.customertoman=sheslfse;
					
					var textInstock=${textInstock};
					this.ruleForm.did=textInstock.innum;
					this.ruleForm.titles=textInstock.theme;
					this.ruleForm.deport=textInstock.dgsnum;
					if (textInstock.tdate!=null) {
						this.ruleForm.havetime =textInstock.tdate;  
					}
					
					this.ruleForm.types=textInstock.dic_name;
					this.ruleForm.domans=textInstock.use_name;
					if (textInstock.intype==3021) {
						this.ruleForm.yesman="确认完毕";
					}
					this.ruleForm.intype=textInstock.intype;

					this.ruleForm.descins=textInstock.indesc;
					this.ruleForm.dodate =textInstock.Idate;  
					
					this.ruleForm.orders=textInstock.theme2;
					this.ruleForm.suppliers=textInstock.supname;
					//this.ruleForm.customertoman=textInstock;
					console.log(textInstock.indesc);
					
					var thisjson=${CartBoxInxlJson};
					this.thismingx = thisjson.map;
					this.quatitys=thisjson.quatitys;
				}

			});
		</script>


</body>

</html>